
/////////////////////////////////////////////////////////
//	File Name : "CMainMenuState.h"
//	Author Name : Zach Bolthouse
//	Purpose : The main menu for the game
/////////////////////////////////////////////////////////

#ifndef _CGAMEPLAYSTATE_H
#define _CGAMEPLAYSTATE_H

#include "stdafx.h"
#include "IGameState.h"
#include "SGD Wrappers\CSGD_Direct3D.h"
#include "SGD Wrappers\CSGD_TextureManager.h"
#include "SGD Wrappers\CSGD_FModManager.h"
#include "SGD Wrappers\CSGD_DirectInput.h"
#include "CEventSystem.h"
#include "CBitmapFont.h"
#include "CAnimationManager.h"
#include "CCharacter.h"
//#include "CProfileManager.h"

class CGamePlayState : public IGameState
{
private:
	// Singleton Pointers
	CSGD_Direct3D*			m_pD3D;
	CSGD_TextureManager*	m_pTM;
	CSGD_FModManager*		m_pFM;
	CSGD_DirectInput*		m_pDI;
	CBitmapFont*			m_pBF;
	CEventSystem*			m_pEM;
	AnimInfo anim;
	RECT m_RenderRect;

	CCharacter* m_Player;
	//CProfileManager*		m_pPM;
	//Texture ID
	int						m_nImageID;
	int						m_nCursorImageID;

	//SoundID
	int						m_nCursorMoveID;
	int						m_nCursorSelectID;
	int						m_nBGStartID;
	int						m_nBGLoopID;

	//User Selection
	int						m_nSelection;
	bool					m_bEnter;
	bool					m_bQuit;
	bool					m_bInputBuffer;
	float					m_fUpDownTimer;

	CGamePlayState();
	~CGamePlayState(){};
	CGamePlayState(const CGamePlayState&);
	CGamePlayState& operator = (const CGamePlayState&);
	
	//////////////////////////////////////////////////////////////
	//  Function: Input
	//
	//  Purpose : Get the user's input
	//////////////////////////////////////////////////////////////
	bool Input();

	//////////////////////////////////////////////////////////////
	//  Function: Update
	//
	//  Purpose : Update all of the objects that require updating
	//			  also process any messages and events that have
	//			  been sent
	//////////////////////////////////////////////////////////////
	void Update(float fElapsedTime);

	//////////////////////////////////////////////////////////////
	//  Function: Render
	//
	//  Purpose : Display the objects to the screen
	//////////////////////////////////////////////////////////////
	void Render(int bright);

public:
	//////////////////////////////////////////////////////////////
	//  Function: GetInstance
	//
	//  Purpose : To create and instance of the singleton if there
	//			  is not one or to return the instance if there is
	//			  one
	//////////////////////////////////////////////////////////////
	static CGamePlayState* GetInstance();

	//////////////////////////////////////////////////////////////
	//  Function: Enter
	//
	//  Purpose : Initialize the states's variables
	//////////////////////////////////////////////////////////////
	void Enter(); 

	//////////////////////////////////////////////////////////////
	//  Function: Exit
	//
	//  Purpose : Unload all textures and sounds as well as delete
	//			  any memory allocated
	//////////////////////////////////////////////////////////////
	void Exit();

	//Accessors
	CSGD_Direct3D* GetDirect3D() {return m_pD3D;}
	CSGD_TextureManager* GetTextureManager() {return m_pTM;}
	CSGD_FModManager* GetFMod() {return m_pFM;}
	CSGD_DirectInput* GetDirectInput() {return m_pDI;}
	//CProfileManager* GetProfileManager() {return m_pPM;}
//	int GetBGSound() {return m_nBGSoundID;}

	//Mutators
	void SetDirect3D(CSGD_Direct3D* pD3D) {m_pD3D = pD3D;}
	void SetTextureManager(CSGD_TextureManager* pTM) {m_pTM = pTM;}
	void SetFMod(CSGD_FModManager* pFM) {m_pFM = pFM;}
	void SetDirectInput(CSGD_DirectInput* pDI) {m_pDI = pDI;}
	//void SetProfile(CProfileManager* pProfile) {m_pPM = pProfile;}

};


#endif